<div >
<ol class="breadcrumb" >
    <li> <i class="fa fa-anchor"></i>
        &nbsp;站点管理
    </li>
    <li>修改站点信息</li>
</ol>
<form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" action={:U("Site/update")} id="form_check">
<table  class="table  table-mcit" >
<tr>
<td>
<div class="col-xs-12">
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;站点名称</label>
        <div class="col-sm-9">
            <input type="hidden" value="{$plant.id}" name="id"/>
            <input type="text" class="form-control required" value="{$plant.name}" placeholder="" name="name">
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;站点坐标</label>
        <div class="col-sm-9">
            <input type="text" class="form-control required"value="{$plant.coordinate}"  name="coordinate" id="coordinate">
        </div>
    </div>
</div>
<div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">
            <i class="fa fa-asterisk required-fa">
            </i>
            &nbsp;所在地
        </label>
        <div class="col-sm-6 control-whole" id="l_before" style="display:none;">
            <select id="location-f" name="location_f" class="form-control" style="width:115px;">
                <option value="0">
                    --
                </option>
                <volist name="china" id="vo">
                    <option value="{$vo.code}">
                        {$vo.name}
                    </option>
                </volist>
            </select>
            <select id="location-s" name="location_s" class="form-control" style="width:115px;border-left:0">
                <option value="0">
                    --
                </option>
                <volist name="china" id="vo">
                    <volist name="vo['area']" id="vovo">
                        <option value="{$vovo.code}" class="{$vo.code}">
                            {$vovo.name}
                        </option>
                    </volist>
                </volist>
            </select>
            <select id="location-t" name="location_t" class="form-control" style="width:115px;border-left:0"
                    disabled>
                <option value="0">--</option>
                <volist name="china" id="vo">
                    <volist name="vo['area']" id="vovo">
                        <volist name="vovo['area']" id="vovovo">
                            <option value="{$vovovo.code}" class="{$vovo.code}">
                                {$vovovo.name}
                            </option>
                        </volist>
                    </volist>
                </volist>
            </select>
        </div>
        <div class="col-sm-9 control-whole" id="l_after">
            <div class="input-group">
                <span class="input-group-btn">
                    <a class="btn btn-default" id="location_change">
                        修改
                    </a>
                </span>
                <input type="text" class="form-control" id="location_show" value="{$plant.location_text}"
                       disabled>
                <input type="hidden" class="form-control" id="location" name="location"
                       value="{$plant.location}">
            </div>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;所在商圈/楼盘</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" value="{$plant.circle}"  name="circle" >
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;状态服务器</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" value="{$plant.state_IP}"   name="state_IP" >
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;详细地址</label>
        <div class="col-sm-9">
            <input type="text" class="form-control "value="{$plant.address}"  name="address" id="address">
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;快充数量</label>
        <div class="col-sm-9">
            <input type="text" class="form-control"value="{$plant.charge_fast_num}"  name="charge_fast_num" >
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;慢充数量</label>
        <div class="col-sm-9">
            <input type="text" class="form-control"value="{$plant.charge_slow_num}"  name="charge_slow_num" >
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">
            <i class="fa fa-asterisk required-fa">
            </i>
            &nbsp;运营服务商
        </label>
        <div class="col-sm-6 control-whole" style="display:none;">
            <select  name="oper_id" class="form-control required" style="width: 100%">
                <volist name="oper" id="oper">
                    <option value="{$oper.id}">{$oper.oper_name}</option>
                </volist>
            </select>
        </div>
        <div class="col-sm-9 control-whole" >
            <div class="input-group">
                <span class="input-group-btn">
                    <a class="btn btn-default" id="oper_names">
                        修改
                    </a>
                </span>
                <input type="text" class="form-control" id="oper_name" value="{$plant.oper_name}"
                       disabled>
                <input type="hidden" class="form-control" id="oper_id" name="oper_id"
                       value="{$plant.oper_id}">
            </div>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;设备商</label>
        <div class="col-sm-9">
            <select  name="plant_type" class="form-control required">
                <option value="00000000">未设置</option>
                <volist name="fac" id="fac">
                    <option value="{$fac.fac_login_name}" <if condition="$plant['plant_type'] eq $fac['fac_login_name']">selected="selected"</if>>{$fac.fac_name}</option>
                </volist>
            </select>
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;停车费参考价</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" placeholder=""  name="park_fee" value="{$plant.park_fee}">
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;充电费参考价</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" placeholder=""  name="charger_fee" value="{$plant.charger_fee}">
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;充电支付方式</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" placeholder=""  name="pay_manner" value="{$plant.pay_manner}">
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;建立时间</label>
        <div class="col-sm-9">
            <input type="text" class="form-control required form_month" value="{$plant.establish_time}" name="establish_time" id="establish_time" data-date-format="yyyy-mm-dd" data-link-format="yyyy-mm-dd">
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;信息来源</label>
        <div class="col-sm-9">
            <select  name="source" class="form-control required">           
                <option value="6">--</option>
                <volist name="source" id="fac">
                    <option value="{$fac.id}" <if condition="$plant['source'] eq $fac['id']">selected="selected"</if>>{$fac.name}</option>
                </volist>
            </select>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;充电接口类型</label>
        <div class="col-sm-9">
            <if condition="$plant.charge_port_type eq 1">
                <input type="radio"  value="1" name="charge_port_type" checked />&nbsp;&nbsp;国标
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="2" />&nbsp;&nbsp;特斯拉
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="3" />&nbsp;&nbsp;ABB
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="4" />&nbsp;&nbsp;其他
            <elseif condition="$plant.charge_port_type eq 2"/>
                <input type="radio"  value="1" name="charge_port_type"/>&nbsp;&nbsp;国标
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="2" checked />&nbsp;&nbsp;特斯拉
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="3" />&nbsp;&nbsp;ABB
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="4" />&nbsp;&nbsp;其他
            <elseif condition="$plant.charge_port_type eq 3"/>
                <input type="radio"  value="1" name="charge_port_type"/>&nbsp;&nbsp;国标
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="2" />&nbsp;&nbsp;特斯拉
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="3" checked />&nbsp;&nbsp;ABB
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="4" />&nbsp;&nbsp;其他
            <else />
                <input type="radio"  value="1" name="charge_port_type"/>&nbsp;&nbsp;国标
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="2" />&nbsp;&nbsp;特斯拉
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="3" />&nbsp;&nbsp;ABB
                &nbsp;&nbsp;<input type="radio" name="charge_port_type" value="4" checked />&nbsp;&nbsp;其他
            </if>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;支持实时</label>
        <div class="col-sm-9">
            <if condition="$plant.is_active eq 1">
                <input type="radio"    value="1" name="is_active" checked>&nbsp;&nbsp;是
                &nbsp;&nbsp;<input type="radio" name="is_active" value="0"/>&nbsp;&nbsp;否
                <else />
                <input type="radio"  value="1" name="is_active" >&nbsp;&nbsp;是
                &nbsp;&nbsp;<input type="radio" name="is_active" value="0"  checked/>&nbsp;&nbsp;否
            </if>
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;电流类型</label>
        <div class="col-sm-9">
            <if condition="$plant.evc_type eq 1">
                <input type="radio"  value="1" name="evc_type" checked>&nbsp;&nbsp;直流
                &nbsp;&nbsp;<input type="radio" name="evc_type" value="2" />&nbsp;&nbsp;交流
                &nbsp;&nbsp;<input type="radio" name="evc_type" value="3" />&nbsp;&nbsp;混合
            <elseif condition="$plant.evc_type eq 2"/>
                <input type="radio"  value="1" name="evc_type" >&nbsp;&nbsp;直流
                &nbsp;&nbsp;<input type="radio" name="evc_type" value="2" checked/>&nbsp;&nbsp;交流
                &nbsp;&nbsp;<input type="radio" name="evc_type" value="3" />&nbsp;&nbsp;混合
            <else />
                <input type="radio"  value="1" name="evc_type" >&nbsp;&nbsp;直流
                &nbsp;&nbsp;<input type="radio" name="evc_type" value="2" />&nbsp;&nbsp;交流
                &nbsp;&nbsp;<input type="radio" name="evc_type" value="3" checked/>&nbsp;&nbsp;混合
            </if>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;场地性质</label>
        <div class="col-sm-9">
            <if condition="$plant.type eq 1">
                   <input type="radio"    value="1" name="type" checked>&nbsp;&nbsp;充电点
                &nbsp;&nbsp;<input type="radio" name="type" value="2"/>&nbsp;&nbsp;家庭
                &nbsp;&nbsp;<input type="radio" name="type" value="3"/>&nbsp;&nbsp;充电站
            <elseif condition="$plant.type eq 2" />
                <input type="radio"    value="1" name="type" />&nbsp;&nbsp;充电点
                &nbsp;&nbsp;<input type="radio" name="type" value="2" checked/>&nbsp;&nbsp;家庭
                &nbsp;&nbsp;<input type="radio" name="type" value="3"/>&nbsp;&nbsp;充电站
            <else />
                <input type="radio"    value="1" name="type" />&nbsp;&nbsp;充电点
                &nbsp;&nbsp;<input type="radio" name="type" value="2" />&nbsp;&nbsp;家庭
                &nbsp;&nbsp;<input type="radio" name="type" value="3" checked/>&nbsp;&nbsp;充电站
            </if>
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;当前状态</label>
        <div class="col-sm-9">
            <if condition="$plant.current_state eq 1">
                <input type="radio"    value="1" name="current_state" checked />&nbsp;&nbsp;运营中
                &nbsp;&nbsp;<input type="radio" name="current_state" value="2"/>&nbsp;&nbsp;安装中
                &nbsp;&nbsp;<input type="radio" name="current_state" value="3"/>&nbsp;&nbsp;规划中
            <elseif condition="$plant.current_state eq 2" />
                <input type="radio"    value="1" name="current_state" />&nbsp;&nbsp;运营中
                &nbsp;&nbsp;<input type="radio" name="current_state" value="2" checked/>&nbsp;&nbsp;安装中
                &nbsp;&nbsp;<input type="radio" name="current_state" value="3"/>&nbsp;&nbsp;规划中
            <else />
                <input type="radio"    value="1" name="current_state" />&nbsp;&nbsp;运营中
                &nbsp;&nbsp;<input type="radio" name="current_state" value="2" />&nbsp;&nbsp;安装中
                &nbsp;&nbsp;<input type="radio" name="current_state" value="3" checked/>&nbsp;&nbsp;规划中
            </if>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;支持预约</label>
        <div class="col-sm-9">
            <if condition="$plant.booking eq 1">
                <input type="radio"   value="1" name="booking" checked>&nbsp;&nbsp;是
                &nbsp;&nbsp;<input type="radio" name="booking" value="0"/>&nbsp;&nbsp;否
                <else />
                <input type="radio"  value="1" name="booking" >&nbsp;&nbsp;是
                &nbsp;&nbsp;<input type="radio" name="booking" value="0"  checked/>&nbsp;&nbsp;否
            </if>
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;经营性质</label>
        <div class="col-sm-9">
            <if condition="$plant.nature eq 1">
                <input type="radio"    value="3" name="nature" >&nbsp;&nbsp;自营
                &nbsp;&nbsp;<input type="radio" name="nature" value="4" />&nbsp;&nbsp;未定
                &nbsp;&nbsp;<input type="radio" name="nature" value="2" />&nbsp;&nbsp;第三方
                &nbsp;&nbsp;<input type="radio" name="nature" value="1" checked/>&nbsp;&nbsp;私人
            <elseif condition="$plant.nature eq 2" />
                <input type="radio"   value="3" name="nature" >&nbsp;&nbsp;自营
                &nbsp;&nbsp;<input type="radio" name="nature" value="4" />&nbsp;&nbsp;未定
                &nbsp;&nbsp;<input type="radio" name="nature" value="2" checked/>&nbsp;&nbsp;第三方
                &nbsp;&nbsp;<input type="radio" name="nature" value="1" />&nbsp;&nbsp;私人
            <elseif  condition="$plant.nature eq 3"/>
                <input type="radio"    value="3" name="nature" checked>&nbsp;&nbsp;自营
                &nbsp;&nbsp;<input type="radio" name="nature" value="4" />&nbsp;&nbsp;未定
                &nbsp;&nbsp;<input type="radio" name="nature" value="2" />&nbsp;&nbsp;第三方
                &nbsp;&nbsp;<input type="radio" name="nature" value="1" />&nbsp;&nbsp;私人
            <else />
                <input type="radio"   value="3" name="nature" />&nbsp;&nbsp;自营
                &nbsp;&nbsp;<input type="radio" name="nature" value="4" checked />&nbsp;&nbsp;未定
                &nbsp;&nbsp;<input type="radio" name="nature" value="2" />&nbsp;&nbsp;第三方
                &nbsp;&nbsp;<input type="radio" name="nature" value="1" />&nbsp;&nbsp;私人
            </if>
            <div id="nature_1" style="display: none">
                <p><input type="text" value="{$plant.private_account}" name="private_account"/>&nbsp;&nbsp;分享用户账号</p>
                <p><input type="text" value="{$plant.private_name}" name="private_name"/>&nbsp;&nbsp;分享用户名称</p>
                <p><input type="text" value="{$plant.private_phone}" minlength='7' maxlength='11' name="private_phone"/>&nbsp;&nbsp;分享用户电话</p>
            </div>
            <div id="nature_2" style="display: none">
                <p><input type="text" value="{$plant.regulated}" name="regulated"/>&nbsp;&nbsp;监管方</p>
                <p><input type="text"  value="{$plant.regulated_phone}" minlength='7' maxlength='11' name="regulated_phone"/>&nbsp;&nbsp;监管方电话</p>
                <p><input type="text"  value="{$plant.company}" name="company"/>&nbsp;&nbsp;公司</p>
                <p><input type="text" value="{$plant.company_phone}" minlength='7' maxlength='11' name="company_phone"/>&nbsp;&nbsp;公司电话</p>
            </div>
            <div id="nature_3" style="display: none">
                <p><input type="text" style="background-color: #FCF8E3" minlength='7' value="{$plant.tel}" maxlength='11' name="tel"/>&nbsp;&nbsp;电话</p>
            </div>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;WIFI支持</label>
        <div class="col-sm-9">
            <if condition="$plant.wifi eq 1">
                <input type="radio"   value="1" name="wifi" checked>&nbsp;&nbsp;是&nbsp;&nbsp;
                &nbsp;&nbsp;<input type="radio" name="wifi" value="0" >&nbsp;&nbsp;否
                <else />
                <input type="radio"   value="1" name="wifi">&nbsp;&nbsp;是&nbsp;&nbsp;
                &nbsp;&nbsp;<input type="radio" name="wifi" value="0" checked>&nbsp;&nbsp;否
            </if>
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;停车处位置</label>
        <div class="col-sm-9">
            <if condition="$plant.floor eq 1">
                <input type="radio"  value="1" name="floor" checked>&nbsp;&nbsp;停车楼
                &nbsp;&nbsp;<input type="radio" name="floor" value="2" />&nbsp;&nbsp;室外
                &nbsp;&nbsp;<input type="radio" name="floor" value="3" />&nbsp;&nbsp;地下室
            <elseif condition="$plant.floor eq 2" />
                <input type="radio" value="1" name="floor" >&nbsp;&nbsp;停车楼
                &nbsp;&nbsp;<input type="radio" name="floor" value="2" checked/>&nbsp;&nbsp;室外
                &nbsp;&nbsp;<input type="radio" name="floor" value="3" />&nbsp;&nbsp;地下室
            <elseif condition="$plant.floor eq 3" />
                <input type="radio"  value="1" name="floor" >&nbsp;&nbsp;停车楼
                &nbsp;&nbsp;<input type="radio" name="floor" value="2" />&nbsp;&nbsp;室外
                &nbsp;&nbsp;<input type="radio" name="floor" value="3" checked/>&nbsp;&nbsp;地下室
            </if>
        </div>
        <div>
            <p id="show-1">&nbsp;&nbsp;&nbsp;<input type="text" name="parking" value="{$plant.parking}" />楼层</p>
            <p id="show-3" style="display: none">&nbsp;&nbsp;&nbsp;<input type="text" name="parking"  value="{$plant.parking}"/>所在位置</p>
            <p id="show-2" style="display: none">&nbsp;&nbsp;&nbsp;<input type="text" name="parking"  value="{$plant.parking}"/>（例：南大门门口）</p>
        </div>
    </div>
</div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">
            &nbsp;环境照片
        </label>
        <div class="col-sm-9">
            <input type="file" name="photo" value="{$plant.photo}" style="margin-top: 5px;">
                <i class="fa fa-hand-o-up"></i>
                &nbsp;上传照片。格式仅限'jpg', 'gif', 'png', 'jpeg'类型，30MB以内。
            </span>
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label">&nbsp;站点描述</label>
        <div class="col-sm-9">
            <textarea class="form-control" rows="3" name="describes" >{$plant.describes}</textarea>
        </div>
    </div>
</div>

<div class="col-xs-6">
    <div class="form-group">
        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;信息来源</label>
        <div class="col-sm-9">
            <select  name="source" class="form-control required">                
                <option value="6">--</option>
                <volist name="source" id="fac">
                    <option value="{$fac.id}" <if condition="$plant['source'] eq $fac['id']">selected="selected"</if>>{$fac.name}</option>
                </volist>
            </select>
        </div>
    </div>
</div><div class="clearfix"></div>
<div class="col-xs-6">
    <div class="form-group">
        <div class="col-sm-offset-9 col-sm-9">
            <button type="submit" class="btn btn-primary"><i class="fa fa-upload"></i>&nbsp;确定</button>
            <a href="javascript:history.go(-1);" class="btn btn-warning"><i class="fa fa-mail-reply"></i>&nbsp;返回</a>
        </div>
    </div>
</div>
</div>
</td>
</tr>
</table>
</form>
</div>
<import type='css' file="css.datetimepicker" />
<import file="js.bootstrap-datetimepicker#min" />
<import file="js.bootstrap-datetimepicker#zh-CN" />
<import file="js.jquery#chained" />
<import file="js.maskedinput" />
<script>
    $(document).ready(function () {
        $("#location-s").chained("#location-f");
        $("#location-t").chained("#location-s");

        $("#location_change").on("click",function(){
            $(this).parents('.col-sm-9').hide();
            $(this).parents('.col-sm-9').prev().show();
            addRequired($("#location-t"));
            $("#location").attr('disabled',true);
        });

        $("#oper_names").on("click",function(){
            $(this).parents('.col-sm-9').hide();
            $(this).parents('.col-sm-9').prev().show();
//            addRequired($("#location-t1"));
            $("#oper_id").attr('disabled',true);
        });

        $(".form_month").datetimepicker({
            language: 'zh-CN',
            autoclose: true,
            startView:'month',
            minView: 'month',
            todayBtn: true,
            viewSelect: 'year',
            pickerPosition: "bottom-left"
        });
        //停车处选择按钮控制
        $("input[name='floor']").change(function(){
            if($("input[name='floor']:checked").val() == 1){
                $("#show-1").show();
                $("#show-2").hide();
                $("#show-3").hide();
            }else if($("input[name='floor']:checked").val() == 2){
                $("#show-2").show();
                $("#show-1").hide();
                $("#show-3").hide();
            }else{
                $("#show-3").show();
                $("#show-1").hide();
                $("#show-2").hide();
            }
        });
        //经营性质按钮控制
        $("input[name='nature']").click(function(){
            if($("input[name='nature']:checked").val() ==3){
                $("#nature_3").show();
                $("#nature_1").hide();
                $("#nature_2").hide();
            }else if($("input[name='nature']:checked").val() ==2){
                $("#nature_2").show();
                $("#nature_1").hide();
            }else if($("input[name='nature']:checked").val() ==1){
                $("#nature_1").show();
                $("#nature_2").hide();
            }else{
                $("#nature_1").hide();
                $("#nature_2").hide();
                $("#nature_3").hide();
            }
        });

        jQuery.extend(jQuery.validator.messages, {
            required: "必选字段"
        });

        $("#form_check").validate(
                {
                    //debug: true,
                    //调试模式取消submit的默认提交功能
                    onkeyup: false,
                    errorClass: "mcit-error",
                    validClass: "mcit-valid",
                    email:true,
                    // submitHandler: function(form){
                    //     //alert("提交服务器");
                    //     form.submit();提交表单
                    // },
                    rules: {
                        num: {
                            minlength: 9,
                        }
                    },
                    messages: {
                        num: {
                            minlength: "格式不对",
                        }
                    },
                    errorPlacement: function (error, element) {
                        error.appendTo(element.next());
                    },
                    highlight: function (element, errorClass) {
                        //$(element).addClass(errorClass);
                        $(element).parent().addClass(errorClass);
                        $(element).next().css("display", "block");
                        $(element).next().next().hide();
                    },
                    success: function (label) {
                        label.parent().next().hide();
                        label.addClass('mcit-valid');
                        label.parent().parent().addClass('mcit-valid');
                        label.parent().css("display", "block");
                        label.html('<i class="fa fa-check"></i>&nbsp;OK');
                    }
                }
        );
    })
</script>